package com.neusoft.neuiotms.dcom.model.enums;

import java.util.Arrays;
import java.util.List;

import com.neusoft.neuiotms.common.constant.IDictionary;

public enum MaintainTaskStatusEnum implements IDictionary {
    undo(1, "未执行"), // 未执行
    doing(2, "执行中"), // 执行中
    done(3, "已执行");// 已执行

    private int value;
    private String label;

    private MaintainTaskStatusEnum(final int value, final String label) {
        this.value = value;
        this.label = label;
    }

    @Override
    public int getValue() {
        return this.value;
    }

    @Override
    public String getLabel() {
        return this.label;
    }

    public static MaintainTaskStatusEnum parse(final int value) {
        MaintainTaskStatusEnum result = null;
        switch (value) {
        case 1:
            result = MaintainTaskStatusEnum.undo;
            break;
        case 2:
            result = MaintainTaskStatusEnum.doing;
            break;
        case 3:
            result = MaintainTaskStatusEnum.done;
            break;
        }
        return result;
    }

    public static List<MaintainTaskStatusEnum> getEnumValues() {
        return Arrays.asList(MaintainTaskStatusEnum.values());
    }
}
